package www.lagou.entity;

import java.io.Serializable;

/**
 * Javabean类
 *      用来存储数据 成员变量私有 提供 get set提供空参 实现序列化
 *      CREATE TABLE `account` (
 *          `id` int(11) NOT NULL AUTO_INCREMENT,
 *          `username` varchar(100) DEFAULT NULL,
 *          `card` varchar(100) DEFAULT NULL,
 *          `balance` double DEFAULT NULL,
 *          PRIMARY KEY (`id`)
 *      ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
 */
public class Account implements Serializable {

    private static final long serialVersionUID = -7052511062566389339L;
    private int id;
    private String username;
    private String card;
    private double balance;

    public Account() {
    }

    public Account(int id, String username, String card, double balance) {
        this.id = id;
        this.username = username;
        this.card = card;
        this.balance = balance;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getCard() {
        return card;
    }

    public void setCard(String card) {
        this.card = card;
    }

    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }

    @java.lang.Override
    public java.lang.String toString() {
        return "Account{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", card='" + card + '\'' +
                ", balance=" + balance +
                '}';
    }
}
